package com.zt.java.proxy;

import java.lang.reflect.Method;

public class AopInvocationHandler extends AbstractInvocationHander{

    private InterceptorChain interceptorChain;

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object intercept = interceptorChain.intercept(new Invocation(this.getTarget(), method, args));
        if(null == intercept){
            return this.getTarget();
        }
        return intercept ;
    }
}
